#include<cstdio>
#include<cstring>
using namespace std;
int main(){
	char s1[1005],s2[1005];
	gets(s1);
	gets(s2);
	
	int len1 = strlen(s1),len2 = strlen(s2);
	int ans = 0;
	for(int i=0;i+len2-1<len1;i++){
		bool matched = true;

		for(int j=0;j<len2;j++){
			if(s1[i+j] != s2[j]){
				matched = false;
				break;
			}
		}
		if(matched){
			ans++;
		}
	}
	printf("%d\n",ans);
	return 0;
} 
